"""
已知 FileName = ["10.py", "2.py", "8.py", "6.py", "100.py"], 请对文件名按照数字从小到大排序
"""
# FileName = ["10.py", "2.py", "8.py", "6.py", "100.py"]
# keys = [i[:-3] for i in FileName]
# keys.sort(key=int)
# nwe_fileName = [i + '.py' for i in keys]
# print(nwe_fileName)

"""
FileName = ["10.py", "2.py", "8.py", "6.py", "100.py"]
def name(name):
    return int(name.split('.')[0])
FileName.sort(key=lambda name: int(name.split('.')[0]))
print(FileName)
"""
"""
请定义一个求 「动态和」 的函数:
传入一个数组 nums 。数组 「动态和」 的计算公式为: runningSum[i] = sum(nums[0]…nums[i]) 。

函数返回 nums 的动态和。

示例 1: 
输入: nums = [1, 2, 3, 4]
输出: [1, 3, 6, 10]
解释: 动态和计算过程为 [1, 1+2, 1+2+3, 1+2+3+4] 。

示例 2: 
输入: nums = [1, 1, 1, 1, 1]
输出: [1, 2, 3, 4, 5]
解释: 动态和计算过程为 [1, 1+1, 1+1+1, 1+1+1+1, 1+1+1+1+1] 。
"""


# def runningSum(*nums):
#     x = 0
#     arr = []
#     for i in nums:
#         x = i + x
#         arr.append(x)
#     return arr


# print(runningSum(*[1, 2, 3, 4, 5]))